﻿<div>
    <Button Type="ButtonType.Primary" @onclick="_=>open()">Open</Button>
    <Drawer Closable="true" @bind-Visible="visible" Placement="DrawerPlacement.Right" Title='("Basic Drawer")' OnClose="OnClose" OnOpen="OnOpen">
        <p>Some contents...</p>
        <p>Some contents...</p>
        <p>Some contents...</p>
    </Drawer>
</div>

@code{

    bool visible = false;

    void open()
    {
        this.visible = true;
    }

    void OnClose()
    {
        Console.WriteLine("closed");
    }

    void OnOpen()
    {
        Console.WriteLine("opened");
    }
}